package cn.edu.scau.cmi.hekaimin.abstractFactoryMethod;

import cn.edu.scau.cmi.hekaimin.simpleFactoryMethod.Accidents;
import cn.edu.scau.cmi.hekaimin.simpleFactoryMethod.CarDamage;
import cn.edu.scau.cmi.hekaimin.simpleFactoryMethod.Casualty;
import cn.edu.scau.cmi.hekaimin.simpleFactoryMethod.Injury;
import cn.edu.scau.cmi.hekaimin.simpleFactoryMethod.Insurance;

public class PingAnFactory extends CompanyFactory {
	public static final String COMPANY = "PingAn";
	@Override
	public Insurance getInsurance(String type) {
		// TODO Auto-generated method stub
		switch(type) {
		   case "身体受伤": return new Injury();
		   case "汽车损坏": return new CarDamage();
		   case "人员伤亡": return new Casualty();
		   case "多种事故": return new Accidents();
		   default: return null;
		}
	}
	public String show() {
		return "PingAn";
	}
}
